package edu.umd.ion.wavemeter.server;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import edu.umd.ion.wavemeter.service.WavemeterData;

public class WavemeterConfigurationMD implements
		WavemeterConfigurationInterface {

	@Override
	public int NumPIDChannels() {
		return 16;
	}	

	@Override
	public int NumRawChannels() {
		return 8;
	}

	@Override
	public int NumVirtChannels() {
		return 16;
	}

	@Override
	public edu.umd.ion.wavemeter.server.ChannelManager ChannelManager(
			PollingThreadInterface Device, WavemeterData data,
			edu.umd.ion.wavemeter.server.ExposureControl c) {
		return new DynamicChannelManager(Device, data, c);
	}

	@Override
	public edu.umd.ion.wavemeter.server.ExposureControl ExposureControl(
			WavemeterData Data) {
		return new DynamicExposureControl(Data);
	}

	@Override
	public edu.umd.ion.wavemeter.server.PIDControl PIDControl(
			WavemeterData Data, edu.umd.ion.wavemeter.server.ChannelManager cm) {
		return new DynamicPIDControl(Data,cm);
	}

	@Override
	public EntityManagerFactory createEntityManagerFactory() {
		return Persistence.createEntityManagerFactory("wavemeter-backend");
	}

	@Override
	public int getAnalogChannelOffset() {
		return 2;
	}

}
